'''Contains the PySimpleGUI layout for the dell_part_finder GUI.'''
import PySimpleGUI as sg
from warranty_manager.claim.common import (
    CANCEL_COLOR, TEXT_LABEL_SIZE, TEXT_INPUT_SIZE
)
from warranty_manager.claim.dell.common import get_credentials_layout


sg.theme('Reddit')


layout = [
    *get_credentials_layout(sandbox=True),
    [
        sg.T('Service Tag', TEXT_LABEL_SIZE),
        sg.I(key='-TAG-', size=TEXT_INPUT_SIZE)
    ],
    [
        sg.T('Device Type', size=TEXT_LABEL_SIZE),
        sg.I(key='-TYPE-', size=TEXT_INPUT_SIZE)],
    [
        sg.Button(
            'Get Parts by Service Tag',
            button_color=('black', '#8cc4e9'),
            tooltip="Creates a JSON file with the provided Dell service tag's "
            "part descriptions and part numbers"
        ),
        sg.Button(
            'Get Parts by Device Type',
            button_color=('black', '#ffa500'),
            tooltip="Creates a JSON file with the provided Dell device type's part descriptions\n"
            "and part numbers (e.g., Desktops, Laptops, and Servers)"
        ),
        sg.Cancel(button_color=CANCEL_COLOR)
    ]
]
